Bugfix #3410 ugrid lead time develop - #3425
Conversation
DanielAdriaansen
left a comment
There was a problem hiding this comment.
Same changes as in #3424
|
@hsoh-u I also suggest we update the MPAS test data for the UGRID capability as part of this PR. Could you try running the unit tests with this file on Seneca?
Here is the static file: |
Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>
It ran OK. At seneca.
|
…nter/MET into bugfix_3410_ugrid_lead_time_develop
|
DanielAdriaansen
left a comment
There was a problem hiding this comment.
I examined log file output from the unit tests run by @hsoh-u on seneca.
The log file I examined was located at:
/d1/personal/hsoh/git/pull_request/MET_bugfix_3410_ugrid_lead_time_develop/log_point_stat_ugrid_v5.log
I saw this output:
DEBUG 1: Forecast File: /d1/projects/MET/MET_test_data/unit_test/ugrid_data/mpas/diag.2025-05-18_12.00.00.9506.OK.nc
DEBUG 1: Observation File: /d1/projects/MET/MET_test_data/unit_test/obs_data/point_obs/gdas1.20250518.t12z.prepbufr_modified.nc
DEBUG 4:
DEBUG 4: Grid information:
DEBUG 4: Projection: UnstructuredGrid
DEBUG 4: n_face: 9506
DEBUG 4:
DEBUG 4:
DEBUG 4: Data plane information:
DEBUG 4: plane min: 275.4225769
DEBUG 4: plane max: 300.0091858
DEBUG 4: valid time: 20250518_120000
DEBUG 4: lead time: 120000
DEBUG 4: init time: 20250518_000000
DEBUG 4: accum time: 000000
DEBUG 4:
DEBUG 5: MetUGridDataFile::data_plane_array(VarInfo &, DataPlaneArray &) -> Found range match for VarInfo "temperature (temperature_925hPa)"
DEBUG 2:
DEBUG 2: --------------------------------------------------------------------------------
DEBUG 2:
DEBUG 2: Reading data for temperature/P925.
DEBUG 2: Using the forecast grid as the verification grid
DEBUG 3: Grid Definition: Projection: UnstructuredGrid n_face: 9506
DEBUG 2: Processing masking regions.
DEBUG 3: Processing Lat/Lon point mask: ALLLATLON
DEBUG 2: For temperature/P925, found 1 forecast levels, 0 forecast climatology mean and 0 standard deviation level(s), and 0 observation climatology mean and 0 standard deviation level(s).
DEBUG 2:
DEBUG 2: --------------------------------------------------------------------------------
DEBUG 2:
DEBUG 3: update_missing_values(T) hdr_inst_typ(data_type=i): found 11157 FillValues out of 11370
DEBUG 3: Processing each "obs.field" name as a GRIB code abbreviation since the point observations are specified as GRIB codes.
DEBUG 2: Searching 120275 observations from 11370 messages.
DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 17267 FillValues out of 32768
DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 15923 FillValues out of 32768
DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 8394 FillValues out of 32768
DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 7476 FillValues out of 21971
DEBUG 2:
DEBUG 2: --------------------------------------------------------------------------------
DEBUG 2:
DEBUG 2: Processing temperature/P925 versus TMP/P1000-500, for observation type ADPSFC, over region ALLLATLON, for interpolation method NEAREST(1), using 3160 matched pairs.
DEBUG 3: Number of matched pairs = 3160
DEBUG 3: Observations processed = 120275
DEBUG 3: Rejected: station id = 0
DEBUG 3: Rejected: obs var name = 107223
DEBUG 3: Rejected: valid time = 0
DEBUG 3: Rejected: bad obs value = 0
DEBUG 3: Rejected: off the grid = 0
DEBUG 3: Rejected: topography = 0
DEBUG 3: Rejected: level mismatch = 7486
DEBUG 3: Rejected: quality marker = 0
DEBUG 3: Rejected: message type = 2406
DEBUG 3: Rejected: masking region = 0
DEBUG 3: Rejected: bad fcst value = 0
DEBUG 3: Rejected: bad climo mean = 0
DEBUG 3: Rejected: bad climo stdev = 0
DEBUG 3: Rejected: mpr filter = 0
DEBUG 3: Rejected: duplicates = 0
DEBUG 2: Computing Categorical Statistics.
DEBUG 2: Computing Scalar Partial Sums and Continuous Statistics.
That output tells me:
- It's reading the new 2025 file from OK with 9506 cells
- The modified gdas obs file to align the observation times with the fcst valid time is being used
- It is comparing temperature from pressure level 925 hPa (P925) with all temperature values from the obs between 1000 and 500 hPa (P1000-500 ) that have a message type of ADPSFC
- With those criteria, it finds 3160 matched pairs
- The FCST_LEAD column in the output file has the correct lead time, as does the output file name
Howard's changes appear to be working, the unit test for point_stat for MPAS/ugrid is updated to newer MPAS data, and the observation valid time was altered to match the forecast.
I approve.



Expected Differences
The
init_hour(orlead_time) is computed.time variablehas the unitsminutes/hours since YYYY-MM-DD, setsinit_timefrom the units attribute.init_time variableis configured at the UGrid configurations, read theinit_time variableand sets oroverrideinit_timeAs a result, the 7 output file names were changed from
*_000000_*to_120000_because init_hour 00 was changed to 12. TheFCST_LEADcolumn at the output files were changed too.The unit.py was updated to handle missing output files and initialized the result object to None
Refactored
UGridFile::open_metadata()atugrid_file.ccand separated two APIs:metadata_coord_variables()andmetadata_time().Do these changes introduce new tools, command line arguments, or configuration file options? [No]
If yes, please describe:
Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]
If yes, please describe:
Pull Request Testing
by unit test
The binary files are available at seneca:/d1/personal/hsoh/git/pull_request/MET_bugfix_3410_ugrid_lead_time_develop/share/met
Note:
/d1/personal/hsoh/git/pull_request/MET_bugfix_3410_ugrid_lead_time_develop/share/met/config/UGridConfig_mpasshould be applied to compute lead_hour (to read the initial_time variable).Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
Do these changes include sufficient testing updates? [No]
The tests themselves were not updated, but the existing tests are now producing different outputs — specifically, the file name and init_hour columns differ across the 7 files.
If yes, describe the new output and/or changes to the existing output:
The output file names are different (from 000000 to 120000). The values in the
init_hourcolumns have also changed.If yes, create a new Update Truth METplus issue to describe them.
The output file names changed from 000000 to 120000. If these are used as input for the test cases, the expected input files may no longer exist. The values in the
init_hourcolumns have also changed.Do these changes introduce new SonarQube findings? [No]
If yes, please describe:
Please complete this pull request review by [Fill in date].
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s) and Development issue
Select: Milestone as the version that will include these changes
Select: METplus-X.Y Support project for bugfix releases or MET-X.Y Development project for the next coordinated release